﻿<UserControl x:Class="DynamicChart.UI.DateSlider"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Height="60" d:DesignWidth="500">
    <UserControl.Resources>
        <Style TargetType="HyperlinkButton">
            <Setter Property="Foreground" Value="#FF73A9D8"/>
            <Setter Property="Padding" Value="2,0,2,0"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="HyperlinkButton">
                        <Grid Name="Background" Background="#01000000" Cursor="{TemplateBinding Cursor}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal">
                                        <Storyboard>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background">
                                                <EasingColorKeyFrame KeyTime="0" Value="#01000000"/>
                                                <EasingColorKeyFrame KeyTime="0:0:0.5" Value="#FF2e2e2e"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOut">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background">
                                                <EasingColorKeyFrame KeyTime="0" Value="#FF2e2e2e"/>
                                                <EasingColorKeyFrame KeyTime="0:0:0.5" Value="#01000000"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background">
                                                <EasingColorKeyFrame KeyTime="0" Value="#01000000"/>
                                                <EasingColorKeyFrame KeyTime="0:0:0.5" Value="#FF2e2e2e"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DisabledOverlay">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <TextBlock x:Name="DisabledOverlay" Foreground="#FFAAAAAA" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" Text="{TemplateBinding Content}" Visibility="Collapsed" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Canvas.ZIndex="1"/>
                            <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            <Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="0"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Border BorderThickness="0" BorderBrush="Black">
        <Grid Background="#FF17709F">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="auto"/>
            </Grid.ColumnDefinitions>
            <Border Grid.Column="0">
                <HyperlinkButton Width="90" Grid.Column="1" Content="2013年" FontSize="20" Foreground="#FFe4d6d6" Name="_ctlBtnYear" Click="_ctlBtnYear_Click" />
            </Border>
            <HyperlinkButton Width="60" Grid.Column="1" Content="选择" FontSize="20" Foreground="#FFe4d6d6" Name="_ctlBtnSelectMoreBackward" Click="_ctlBtnSelectMoreBackward_Click" />
            <Border BorderThickness="0" Margin="5" BorderBrush="Black" Grid.Column="2">
                <Canvas x:Name="LayoutRoot" Background="#01FFFFFF" MouseLeftButtonUp="LayoutRoot_MouseLeftButtonUp" MouseWheel="LayoutRoot_MouseWheel">
                   
                </Canvas>
            </Border>
            <HyperlinkButton Width="60" Grid.Column="4" Content="选择" FontSize="20" Foreground="#FFe4d6d6" Name="_ctlBtnSelectMoreForward" Click="_ctlBtnSelectMoreBackward_Click" />
        </Grid>
    </Border>
</UserControl>
